home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / comm / cnet / edpwhoba.lha / EDPEDWho.rexx next >
OS/2 REXX Batch file  |  1997-01-11  |  3KB  |  120 lines

  1. /* EditWho.rexx by Galt of Atlantis 1:3612/369 (904)479-3133 | 479-4080     */
  2. /*                                                                          */
  3. /* This is a small utility to edit the items normally found in the various  */
  4. /* 'who' displays, including the stock CNET who.                            */
  5. /* This will allow the user, in one menu, or accessing my EDPWHoBan.rexx,   */
  6. /* Their organization, City, State, and Country.                            */
  7. /* I like this especially because the normal CNET priv flags do not allow   */
  8. /* you to give the user access to change the city state & county WITHOUT    */
  9. /*changing their actual STREET adrress.                                     */
  10. /* Just add a menu item:                              */
  11. /*                                                    */
  12. /* EDW    | {#0pfiles:rexx/editwho.rexx}              */
  13. /*          |                                         */
  14. /*           \Control Q and Path to program.          */
  15.  
  16. acc=2                /*Lowest access level to use the program */
  17.  
  18. options results
  19. tr=transmit;ss=sendstring;gu=getuser;pu=putuser
  20. gu 15;access=result
  21. if access < acc then exit
  22. getuser 1;name=result
  23. getuser 1100461;sex=result
  24. if sex=0 then nm='c9'name
  25. if sex=1 then nm='cc'name
  26.  
  27. MAIN:
  28. changewhere 'EditWho'
  29. gu 1300150;sta=result
  30. gu 1300192;cou=result
  31. gu 1300562;ban=result
  32. gu 59;org=result
  33. call open(last, '_Last.txt',r)
  34. banner=readln(last)
  35. call close(last)
  36. last=left(banner,43)
  37. tr " f1n4 z4cbEditWho.Rexxq1n1"
  38. tr "  cf[cbScf]cetate        cf:ce "sta
  39. tr "  cf[cbCcf]ceountry      cf:ce "cou
  40. tr "  cf[cbBcf]ceanner       cf:ce "ban
  41. /*tr "  cf[cbEcf]cedit Last    cf:ce "last*/
  42. tr "  cf[cbOcf]cerganization cf:ce "org
  43. tr "  cf[cbWcf]ceho"
  44. ss " n1cf[cbSCBOW?cf] ccChoice? ca:"
  45. getchar;ans=result
  46. call CHECK
  47. if ans=" " then call quit
  48. if ans="W" then call who
  49. if ans="O" then call organ
  50. if ans="B" then call newb
  51. if ans="S" then call state
  52. if ans="C" then call count
  53. /*if ans="E" then call elast*/
  54. if ans="?" then call main
  55. if ans="Q" then call quit
  56. call quit
  57.  
  58. WHO:
  59. tr 'f1'
  60. bbscommand "who"
  61. tr "n1cfPress any key to continue... g1"
  62. call main
  63.  
  64. ORGAN:
  65. tr 'O'
  66. addkeys org
  67. ss "f1n4c6Change your ORGANIZATION :-->> [cc29 chars maxcf]cfn2 |||||||||||||||||||||||||||||n1"
  68. prompt 29 normal "ca:"
  69. st=result
  70. setobject st
  71. putuser 59
  72. call main
  73.  
  74. STATE:
  75. tr 'S'
  76. addkeys sta
  77. tr "f1n3c6Change your STATE :-->> [cc20 chars maxcf]cfn2 ||||||||||||||||||||"
  78. prompt 20 normal "ca:"
  79. st=result
  80. setobject st
  81. putuser 1300150
  82. call main
  83.  
  84. COUNT:
  85. tr 'C'
  86. addkeys cou
  87. tr "f1n3c6Change your COUNTRY :-->> [cc3 chars maxcf]cfn2 |||"
  88. prompt 3 normal "ca:"
  89. ct=upper(result)
  90. setobject ct
  91. putuser 1300192
  92. call main
  93.  
  94. ELAST:
  95. tr 'ELAST'
  96. bbscommand "elast"
  97. tr "n1cfPress any key to continue... g1"
  98. call main
  99.  
  100. NEWB:
  101. tr 'NEWB'
  102. bbscommand "newb"
  103. tr "n1cfPress any key to continue... g1"
  104. call main
  105.  
  106. QUIT:
  107. tr 'Q'
  108. bufferflush
  109. exit
  110.  
  111. CHECK:;if result~='###PANIC' then return;logentry 'Lost Carrier in EditWho.rexx!';bufferflush;exit
  112. SYNTAX:;ERROR:;IOERR:
  113. e1=' c9Errorcf: ca'rc' cf(ca'errortext(rc)'cf)'
  114. e2='  c9Linecf: ce'left(sigl,4)'c9Filecf:';getuser 1311992;a=result
  115. getuser 1311960;b=result;c='cb"ce'a||b'cb"';e2=e2' 'c;tr e1;tr e2;logentry e1
  116. logentry e2;e=sourceline(sigl);do while e~='';e3='c9Sourcecf: cd'
  117. e3=e3||left(e,37);transmit e3;logentry e3;e=substr(e,38);end;bufferflush;exit
  118.  
  119. /*Last Edit July 6, 1996*/
  120.